<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>管理系统</title>
    <link rel="stylesheet" th:href="@{/webjars/bootstrap/5.1.3/css/bootstrap.min.css}">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css">
    <style>
        .sidebar {
            position: fixed;
            top: 0;
            bottom: 0;
            left: 0;
            z-index: 100;
            padding: 48px 0 0;
            box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
            background-color: #f8f9fa;
            width: 250px;
        }
        
        .main-content {
            margin-left: 250px;
            padding: 20px;
            margin-top: 56px;
        }
        
        .nav-link {
            color: #333;
            padding: 0.8rem 1rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .nav-link:hover {
            background-color: #e9ecef;
        }
        
        .nav-link.active {
            color: #fff;
            background-color: #0d6efd;
        }
        
        .nav-link i {
            font-size: 1.2rem;
        }
    </style>
</head>
<body>
    <!-- 顶部导航栏 -->
    <nav class="navbar navbar-dark bg-primary fixed-top">
        <div class="container-fluid">
            <a class="navbar-brand" th:href="@{/}">
                <i class="bi bi-building"></i>
                管理系统
            </a>
            <div class="d-flex align-items-center">
                <span class="navbar-text me-3">
                    <i class="bi bi-person-circle"></i>
                    欢迎使用
                </span>
            </div>
        </div>
    </nav>

    <!-- 侧边栏 -->
    <nav class="sidebar">
        <div class="position-sticky">
            <ul class="nav flex-column">
                <li class="nav-item">
                    <a class="nav-link active" th:href="@{/}">
                        <i class="bi bi-house-door"></i>
                        首页
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" th:href="@{/user/list}">
                        <i class="bi bi-people"></i>
                        用户管理
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" th:href="@{/role/list}">
                        <i class="bi bi-person-badge"></i>
                        角色管理
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" th:href="@{/department/list}">
                        <i class="bi bi-diagram-3"></i>
                        部门管理
                    </a>
                </li>
            </ul>
        </div>
    </nav>

    <!-- 主要内容区域 -->
    <main class="main-content">
        <div class="row g-4">
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body text-center">
                        <i class="bi bi-people fs-1 text-primary mb-3"></i>
                        <h3 class="card-title">用户管理</h3>
                        <p class="card-text">管理系统用户，包括添加、编辑、删除和查询用户信息。</p>
                        <a th:href="@{/user/list}" class="btn btn-primary">
                            进入管理
                        </a>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body text-center">
                        <i class="bi bi-person-badge fs-1 text-primary mb-3"></i>
                        <h3 class="card-title">角色管理</h3>
                        <p class="card-text">管理系统角色，设置不同角色的权限和职责。</p>
                        <a th:href="@{/role/list}" class="btn btn-primary">
                            进入管理
                        </a>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body text-center">
                        <i class="bi bi-diagram-3 fs-1 text-primary mb-3"></i>
                        <h3 class="card-title">部门管理</h3>
                        <p class="card-text">管理公司部门，进行部门的增删改查操作。</p>
                        <a th:href="@{/department/list}" class="btn btn-primary">
                            进入管理
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <script th:src="@{/webjars/bootstrap/5.1.3/js/bootstrap.bundle.min.js}"></script>
</body>
</html> 